package Ms

import "db2s/global"

type LengthLimit struct {
	DBType string
}

func (ms LengthLimit) MetaLengthLimit(s global.LengthLimitInput) (length int64, err error) {
	switch s.ObjectType {
	case "schemaName":
		return 128, nil
	case "tableName":
		return 128, nil
	case "columnName":
		return 128, nil
	case "tableComment":
		return 8000, nil
	case "columnComment":
		return 8000, nil
	case "indexName":
		return 128, nil
	default:
		return 0, nil
	}
}
